package com.isoftstone.project.facilities.management.service.impl;

import java.util.List;

                                import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.isoftstone.project.facilities.management.mapper.FacilitiesManagementMapper;
import com.isoftstone.project.facilities.management.domain.FacilitiesManagement;
import com.isoftstone.project.facilities.management.service.IFacilitiesManagementService;
import com.isoftstone.framework.domain.Page;
import com.isoftstone.common.utils.text.Convert;

/**
 * 设备串口协议参数设置Service业务层处理
 *
 * @author guoX
 * @date 2021-02-02
 */
@Service
public class  FacilitiesManagementServiceImpl implements IFacilitiesManagementService {
    @Autowired
    private FacilitiesManagementMapper facilitiesManagementMapper;

    /**
     * 查询设备串口协议参数设置
     *
     * @param managementId 设备串口协议参数设置ID
     * @return 设备串口协议参数设置
     */
    @Override
    public FacilitiesManagement getFacilitiesManagementById(String managementId) {
        return facilitiesManagementMapper.getFacilitiesManagementById(managementId);
    }

    /**
     * 查询设备串口协议参数设置列表
     *
     * @param page 分页参数
     * @return 设备串口协议参数设置
     */
    @Override
    public List<FacilitiesManagement> getFacilitiesManagementlistPage(Page page) {
        return facilitiesManagementMapper.getFacilitiesManagementlistPage(page);
    }

    /**
     * 新增设备串口协议参数设置
     *
     * @param facilitiesManagement 设备串口协议参数设置
     * @return 结果
     */
    @Override
    public int insertFacilitiesManagement(FacilitiesManagement facilitiesManagement) {
                                                                                                                                                                                return facilitiesManagementMapper.insertFacilitiesManagement(facilitiesManagement);
    }

    /**
     * 修改设备串口协议参数设置
     *
     * @param facilitiesManagement 设备串口协议参数设置
     * @return 结果
     */
    @Override
    public int updateFacilitiesManagement(FacilitiesManagement facilitiesManagement) {
                                                                                                                                                                                return facilitiesManagementMapper.updateFacilitiesManagement(facilitiesManagement);
    }

    /**
     * 删除设备串口协议参数设置对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFacilitiesManagementByIds(String ids) {
        return facilitiesManagementMapper.deleteFacilitiesManagementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备串口协议参数设置信息
     *
     * @param managementId 设备串口协议参数设置ID
     * @return 结果
     */
    @Override
    public int deleteFacilitiesManagementById(String managementId) {
        return facilitiesManagementMapper.deleteFacilitiesManagementById(managementId);
    }

}
